package com.sprouting.personal.model.entity;

import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.sprouting.personal.annotations.CheckLength;
import com.sprouting.personal.annotations.CheckNotNull;
import com.sprouting.personal.model.common.BaseModel;
import com.sprouting.personal.model.common.jsr.AddGroup;
import com.sprouting.personal.model.common.jsr.UpdGroup;
import lombok.Data;

import javax.validation.constraints.Null;

/**
 * 签到组
 *
 * @author ：LX（长沙麓谷）
 * @date 创建时间： 2023/7/2 12:17
 */
@Data
@TableName("ps_task_sign")
public class TaskSign extends BaseModel {

    /**
     * 主键
     */
    @TableId
    @CheckNotNull(message = "非法ID", groups = UpdGroup.class)
    @Null(message = "无效ID", groups = AddGroup.class)
    private String id;
    /**
     * 所属用户ID
     * @see User#getId()
     */
    @CheckNotNull(message = "请选择所属用户", groups = UpdGroup.class)
    private String userId;
    /**
     * 组名
     */
    @CheckLength(min = 1, max = 150, message = "名称超过长度限制")
    @CheckNotNull(message = "请输入名称")
    private String name;
    /**
     * 详情
     */
    @CheckLength(max = 1000, message = "详情超过长度限制")
    private String details;

}
